package edu.yngsxy.wkstudy.core.config;

import jakarta.validation.constraints.NotEmpty;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
@Component//使用Component注解，声明一个组件，被控制器依赖注入
@Data
@ConfigurationProperties(prefix = "wechat.mp")//wechat为配置文件中key的前缀
public class WechatMpConfig {
    @NotEmpty(message = "appid不能为空")
    private String appid;
    @NotEmpty(message = "secret不能为空")
    private String secret;
}
